package org.ds.blog.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.ds.blog.model.CustomCode;

@EqualsAndHashCode(callSuper = true)
@Data
public class CustomException extends RuntimeException{
    private String code;
    private String message;

    public CustomException(CustomCode customCode) {
        this.code = customCode.getCode();
        this.message = customCode.getMessage();
    }
}
